package to;

public class SiloTO {
	private String siloName;
	private int totalWeight;
	private String siloStatus;
	private int bigBeansWeight;
	
	public SiloTO() {}

	public SiloTO(String siloName, int totalWeight, String siloStatus,
			int bigBeansWeight) {
		this.siloName = siloName;
		this.totalWeight = totalWeight;
		this.siloStatus = siloStatus;
		this.bigBeansWeight = bigBeansWeight;
	}

	public String getSiloName() {
		return siloName;
	}

	public void setSiloName(String siloName) {
		this.siloName = siloName;
	}

	public int getTotalWeight() {
		return totalWeight;
	}

	public void setTotalWeight(int totalWeight) {
		this.totalWeight = totalWeight;
	}

	public String getSiloStatus() {
		return siloStatus;
	}

	public void setSiloStatus(String siloStatus) {
		this.siloStatus = siloStatus;
	}

	public int getBigBeansWeight() {
		return bigBeansWeight;
	}

	public void setBigBeansWeight(int bigBeansWeight) {
		this.bigBeansWeight = bigBeansWeight;
	}

	@Override
	public String toString() {
		return "SiloTO [siloName=" + siloName + ", totalWeight=" + totalWeight
				+ ", siloStatus=" + siloStatus + ", bigBeansWeight="
				+ bigBeansWeight + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + bigBeansWeight;
		result = prime * result
				+ ((siloName == null) ? 0 : siloName.hashCode());
		result = prime * result
				+ ((siloStatus == null) ? 0 : siloStatus.hashCode());
		result = prime * result + totalWeight;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SiloTO other = (SiloTO) obj;
		if (bigBeansWeight != other.bigBeansWeight)
			return false;
		if (siloName == null) {
			if (other.siloName != null)
				return false;
		} else if (!siloName.equals(other.siloName))
			return false;
		if (siloStatus == null) {
			if (other.siloStatus != null)
				return false;
		} else if (!siloStatus.equals(other.siloStatus))
			return false;
		if (totalWeight != other.totalWeight)
			return false;
		return true;
	}
	
}
